import 'package:furaha_mkopo/manager/fm_init_manager.dart';

class FMLanguageTool{
  static Map<String,String> tanzaniaText = {
    "Step":"Step",
    "Fill":"Fill in",
    "Completed":"Completed",
    "DescTip":"Please fill in your information truthfully",
  };

  static Map<String,String> swahiliText = {
    "Step":"Hatua ya ",
    "Fill":"Jaza",
    "Completed":"Imekamilika",
    "DescTip":"Tafadhali jaza maelezo yako kwa ukweli",
  };

  static String getAssets(String path,
      {String suffix = ".png"}) {
    if (language == FMLanguageEnum.swahili) {
      return "${path}_swahili$suffix";
    }
    return path + suffix;
  }

  static String getText(String text) {
    if (language == FMLanguageEnum.swahili) {
      switch(text){
        case "Step1":
          return "Hatua ya 1";
        case "Step2":
          return "Hatua ya 2";
        case "Step3":
          return "Hatua ya 3";
        case "Step4":
          return "Hatua ya 4";
        case "Step5":
          return "Hatua ya 5";
        case "Fill in":
          return "Jaza";
        case "Completed":
          return "Imekamilika";
        case "Please fill in your information truthfully":
          return "Tafadhali jaza maelezo yako kwa ukweli";
        case "Identity authentication":
          return "Uthibitishaji Wa Kitambulisho";
        case "Please select ont of the following documents to upload":
          return "Tafadhali chagua mojawapo ya hati zifuatazo ili kupakia";
        case "Next":
          return "Inayofuata";
        case "NIDA（CITIZEN IDENTITY CARD）":
          return "NIDA (KITAMBULISHO CHA MWANANCHI)";
        case "Voter Card（KADI YA MPIGA KURA）":
          return "Kadi ya Mpiga Kura (KADI YA MPIGA KURA)";
        case "Other":
          return "Nyingine";
        case "Cancel":
          return "Ghairi";
        case "Correct NIDA":
          return "NIDA sahihi";
        case "Correct Voter Card":
          return "Kadi Sahihi ya Mpiga\nKura";
        case "Correct\nDemonstration":
          return "Onyesho\nSahihi";
        case "You have completed certification":
          return "Umekamilisha uidhinishaji";
        case "Now you can complete your payment information and submit your loan application.":
          return "Sasa unaweza kukamilisha maelezo yako ya malipo na kutuma maombi yako ya mkopo.";
        case "Apply Now":
          return "Tumia Sasa";
        case "Please confirm":
          return "Tafadhali thibitisha";
        case "Please select a address":
          return "Tafadhali chagua anwani";
        case "Confirm":
          return "Thibitisha";
        case "Please select a time":
          return "Tafadhali chagua wakati";
        case "Day":
          return "Siku";
        case "Month":
          return "Mwezi";
        case "Years":
          return "Miaka";
        case "Try again":
          return "Jaribu tena";
        case "Start Now":
          return "Anza Sasa";
        case "Phone number":
          return "Nambari ya simu";
        case "LOGIN":
          return "INGIA";
        case "Please enter your phone number":
          return "Tafadhali ingiza namba yako ya simu";
        case "Verification code":
          return "Nambari ya uthibitishaji";
        case "Get Code":
          return "Pata Msimbo";
        case "Retry":
          return "Jaribu tena";
        case "Resend":
          return "Tuma tena";
        case "Login":
          return "Ingia";
        case "I agree to the":
          return "Ninakubali";
        case "<Privacy Policy>":
          return "<Sera ya Faragha>";
        case "Welcome to Furaha Mkopo ！":
          return "Karibu Furaha Mkopo !";
        case "My Orders":
          return "Maagizo Yangu";
        case "Real-time synchronization,view the latest order status at any time.":
          return "Usawazishaji wa wakati halisi, tazama hali ya hivi karibuni ya agizo wakati wowote.";
        case "Repayment":
          return "Ulipaji";
        case "Applying":
          return "Inatuma";
        case "Finished":
          return "Imekamilika";
        case "All":
          return "Wote";
        case "More functions":
          return "Vitendaji zaidi";
        case "Version":
          return "Toleo";
        case "settings":
          return "Mipangilio";
        case "Account Cancellation":
          return "Kughairiwa kwa akaunti";
        case "I'll take a look!":
          return "Nitaangalia!";
        case "Logout":
          return "Ondoka";
        case "I have read and agree to the above.":
          return "Nakubaliana na hayo hapo juu.";
        case "Step 2":
          return "Hatua ya 2";
        case "Step 3":
          return "Hatua ya 3";
        case "Step 4":
          return "Hatua ya 4";
        case "Network request error":
          return "Kukosea ombi la mtandao";
        case "Send Success":
          return "Tuma mafanikio";
        case "Network Connection Error":
          return "Kuhusiana na Mtandao";
        case "Please enter the verification code":
          return "Tafadhali ingiza sheria ya kuthibitisha";
        case "Please read and agree to the Privacy Policy":
          return "Tafadhali soma na kukubaliana na Sera ya Private";
        default:
          return text;
      }
    }
    return text;
  }

  static String getTimeText(int seconds){
    if(language == FMLanguageEnum.swahili){
      return "sek $seconds";
    }
    return "${seconds}s";
  }

  static FMLanguageEnum get language {
    return FMInitManager().language ? FMLanguageEnum.swahili : FMLanguageEnum.tanzania;
  }
}
enum FMLanguageEnum{
  tanzania,
  swahili
}